var t = getApp(), e = t.requirejs("core"), a = (t.requirejs("icons"), t.requirejs("jquery"));
Page({

  data: {
    datas:{},
    article_content:'',
  },

  onLoad: function (options) {
    this.setData({
      a_id: options.id ? options.id : 2,
    })
    this.getDetail(options.id ? options.id : 2);
  },

  getDetail: function(id) {
    var t = this;
    e.post("activity/get_sign_up_detail", {id:id}, function(res) {
      t.setData({
        datas:res.res,
      })
    });
  },  

   // 导航
   goToAddress: function () {
    var that = this;
    wx.getLocation({
      type: 'gcj02', //返回可以用于wx.openLocation的经纬度
      success (res) {
        wx.openLocation({
          latitude: Number(that.data.datas.lat),//要去地点的纬度
          longitude: Number(that.data.datas.lng),///要去地点的经度-地址
          scale: 18,
          name: that.data.datas.site,
          address: that.data.datas.address,
        })
      }
     })
  },

  toPay(e){
    
    let id = this.data.a_id;//报名id

    wx.navigateTo({
      url: "/signUp/pay/index?sign_id=" + id
    })
  },


  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})